function nyroModalDebug(n,t){t.full&&t.bg?(t.bg.prepend(n+"
"+tmpDebug),tmpDebug=""):tmpDebug+=n+"
"}function loadUserInfo(n,t,i,r){var f="#result",u="/Pages/ControlLoaderPage.aspx?ReturnUrl="+encodeURIComponent(t)+"&controlPath="+encodeURIComponent("~/UserControls/Login/LoginControl.ascx")+"&pageId="+r;u=u+"&t="+encodeURIComponent(+new Date),u=u+" "+f,n.load(u,i)}function InitWeatherControl(n){handleLocationSelected=function(t){t==undefined&&(t=$.cookie(n.cookieKey),t==null&&(t=n.defaultLocationId));var i=n.weatherServiceUrl+"?geoid="+t+"&control="+n.controlId;$.get(i,function(t){t!=undefined&&$(n.contentElementSelector).replaceWith(t)}),$("#weatherWidgetContent")!=null&&$.get(n.weatherServiceUrl+"?geoid="+t+"&control=footer",function(t){t!=undefined&&$(n.footerElementId).replaceWith(t)})},(new GeoLocationSelectorEvents).OnLocationSelected(handleLocationSelected);var t=n.defaultLocationId,i=$.cookie(n.cookieKey);i==null||i==t?t!=null&&t!=undefined&&handleLocationSelected(t):handleLocationSelected(i)}function FacebookSubscriptor(n,t){var i=this;i.url=n,i.page=t,i.init=function(){window.FB?(i.SubscribeLikeEvent(),i.SubscribeUnlikeEvent()):document.fbHelper.addLoggedInListener(this,function(){i.SubscribeLikeEvent(),i.SubscribeUnlikeEvent()})},i.SubscribeLikeEvent=function(){window.FB.Event.subscribe("edge.create",function(){$.ajax({url:i.url,data:{pageLink:i.page,provider:"facebook"}})})},i.SubscribeUnlikeEvent=function(){window.FB.Event.subscribe("edge.remove",function(){$.ajax({url:i.url,data:{pageLink:i.page,unlike:"1",provider:"facebook"}})})}}function TwitterSubscriptor(n,t){var i=this;i.url=n,i.page=t,i.init=function(){window.twttr&&i.SubscribeLikeEvent()},i.SubscribeLikeEvent=function(){window.twttr.events.bind("tweet",function(){$.ajax({url:i.url,data:{pageLink:i.page,provider:"twitter"}})})}}function UrlHandler(n){this._url=n,this._locationHref=window.location.href,this._cookie=document.cookie,this._urlVars}function SetDefaultNyroModalSettings(){$.nyroModalSettings({closeButton:'Stäng<\/strong><\/a>',galleryCounts:"",galleryLinks:"",disableArrows:!0})}function GetComments(n){var t=0,i;return arguments.length==1&&(t=n),i={page:commentList.currentPage,action:commentList.getAction,size:$("#pagesizeSelect").val(),pagenumber:t},CallCommentService(i),!1}function AddComment(n){return n===undefined&&(n={page:commentList.currentPage,remoteip:commentList.ipAddress,author:$("#namn").val(),body:$("#kommentar").val(),link:$("#websida").val(),isagree:$("#comment-agree-disclaimer").prop("checked"),action:commentList.addAction,size:$("#pagesizeSelect").val(),pagenumber:0}),CallCommentService(n),!1}function CallCommentService(n){$.ajax({url:commentList.serviceUrl,data:n,type:"POST",timeout:3e4,success:function(n){$(".ajax-comment-list-container").html(n),$(".ajax-comment-list-container").html($("#ajax-comment-container").html())},error:function(){alert("Comment's message is invalid!")},complete:function(n){var i="signatureErrors",r="textErrors",u="acceptDisclaimerErrors";Validate(n)&&(n.getResponseHeader("commentAdded")!=null&&n.getResponseHeader("commentAdded").length>0&&$("#article-comment").find("#buttonFbcPublishComment").click(),$("#kommentar").val(""),$("#websida").val("http://"),$("#comment-agree-disclaimer").attr("checked",!1)),UpdateCommentCount($("#all-comments").html()),UpdateShowCommentCount($("#comment-counter").html()),$(".comment-count").html()=="0"?$("#zeroComment").show():$("#zeroComment").hide(),$("#article-comment").trigger("commentsLoaded")}})}function UpdateCommentCount(n){$(".comment-count").html(n)}function UpdateShowCommentCount(n){$(".displayed-comments").html(n)}function openReportDialog(n,t){$.get(commentServices.abuseReportFormUrl,function(i){$.nyroModalManual({content:i,title:"Anmäl kommentaren",endRemove:showDisclaimerVar.onEndRemove}),$("#buttonSendReport").bind("click",function(){SendReport(n,t)})})}function ValidateAbuseReport(){$("#abuseMailErrors").hide(),$("#abuseBodyErrors").hide(),$("#abuseReportMail").removeClass("inputerror"),$("#abuseReportBody").removeClass("inputerror");var n=!1,i=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,t=$("#abuseReportMail").val();return t!=null&&t!=""&&i.test(t)||(n=!0,$("#abuseReportMail").addClass("inputerror"),$("#abuseMailErrors").show()),($("#abuseReportBody").val()==null||$("#abuseReportBody").val()=="")&&(n=!0,$("#abuseReportBody").addClass("inputerror"),$("#abuseBodyErrors").show()),!n}function SendReport(n,t){ValidateAbuseReport()&&$.ajax({url:commentServices.abuseReportServiceUrl,data:{action:"add",email:$("#abuseReportMail").val(),body:$("#abuseReportBody").val(),commentId:t},type:"POST",timeout:3e4,success:function(){$.get(commentServices.abuseReportUrl,function(n){$("#nyroModalContent").html(n),$("#disclaimerLink").unbind("click",showDisclaimerVar.showDisclaimer),$("#disclaimerLink").bind("click",showDisclaimerVar.showDisclaimer)}),DisableReportLink(n)},error:function(){$.nyroModalManual({content:"Error",title:"Anmäl kommentaren"})},complete:function(){}})}function DisableReportLink(n){$(n).html($("").text(commentServices.disabledReportLinkText)),$(n).attr("onclick","")}function show_more_button(n,t,i,r,u,f,e,o,s,h){try{this.total=n,this.page=t,this.button=i,this.pagesize=r,this.layout=u,this.buttonwrapper=e,this.container=f,this.subStoryId=o,this.pageId=s,this.url=h,this.init=function(){var n=this;n.button.click(function(){n.buttonwrapper.attr("disabled","disabled"),$.get(n.url,{pageIndex:++n.page,amount:n.pagesize.toString(),layout:n.layout,subStoryId:n.subStoryId,pageId:n.pageId},function(t){n.total<=n.pagesize*n.page?(n.button.hide(),n.container.next().find(".span1").html(n.total)):n.container.next().find(".span1").html(n.pagesize*n.page),n.container.append(t),n.buttonwrapper.removeAttr("disabled"),$.shareTools&&n.container.find(".sharetooltip").shareTools()},"html")})}}catch(c){}}function StoryShowMore(n,t,i,r,u,f,e,o,s,h,c){try{this.total=n,this.lastItemIndex=t,this.amount=r,this.button=i,this.layout=u,this.buttonwrapper=e,this.container=f,this.subStoryId=o,this.pageId=s,this.url=h,this.init=function(){var n=this;n.button.click(function(){n.buttonwrapper.attr("disabled","disabled"),n.lastItemIndex=n.lastItemIndex+n.amount,$.get(n.url,{last:n.lastItemIndex,amount:n.amount.toString(),pageId:n.pageId,layout:u,subStoryId:o},function(t){n.total<=n.lastItemIndex?(c&&n.buttonwrapper.hide(),n.button.hide(),n.container.next().find(".span1").html(n.total)):n.container.next().find(".span1").html(n.lastItemIndex),n.container.append(t),n.buttonwrapper.removeAttr("disabled"),$.shareTools&&n.container.find(".sharetooltip").shareTools()},"html")})}}catch(l){}}function show_more_small_auto_teasers(n,t,i,r,u,f,e,o,s,h){try{this.total=n,this.lastItemIndex=t-1,this.amount=r,this.button=i,this.buttonwrapper=f,this.container=u,this.pageId=e,this.url=o,this.excludedTeasersList=s,this.normalTeaser=h||0,this.init=function(){var n=this;n.button.click(function(){n.buttonwrapper.attr("disabled","disabled"),$.get(n.url,{last:n.lastItemIndex,amount:n.amount.toString(),pageId:n.pageId,excludedTeasersList:n.excludedTeasersList,ts:$.now()},function(t){n.lastItemIndex=n.lastItemIndex+n.amount,n.total+n.normalTeaser<=n.lastItemIndex+1?(n.button.hide(),n.container.next().find(".span1").html(n.total)):n.container.next().find(".span1").html(n.lastItemIndex+1-h),n.container.append(t),n.buttonwrapper.removeAttr("disabled"),$.shareTools&&n.container.find(".sharetooltip").shareTools()},"html")})}}catch(c){alert(c)}}function show_more_button_archive(n,t,i,r,u,f,e,o){try{this.total=n,this.page=t,this.button=i,this.pagesize=r,this.date=u,this.buttonwrapper=e,this.container=f,this.url=o,_self=this,this.init=function(){_self.button.click(function(){_self.buttonwrapper.attr("disabled","disabled"),$.get(_self.url,{pageIndex:++_self.page,amount:_self.pagesize.toString(),date:_self.date},function(n){_self.total<=_self.pagesize*_self.page?(_self.button.hide(),$("#"+_self.container.attr("id")+" .span1").html(_self.total)):$("#"+_self.container.attr("id")+" .span1").html(_self.pagesize*_self.page),$(_self.container).append(n),_self.buttonwrapper.removeAttr("disabled")},"html")})}}catch(s){}}function showMoreDyhetsdygnet(n,t,i,r,u,f){var e=$("#"+n),o=e.find("li").length;$("#"+r).hide(),$("#"+u).css("display","inline-block"),$.get("/WebServices/ArchiveArticleService.ashx",{loadedCounting:o,date:t},function(n){e.append(n);var t=e.find("li").length;$("#"+i).html(t),$("#"+u).hide(),t>=parseInt($("#"+f).text())?$("#"+r).hide():$("#"+r).show()},"html")}function ShareToFacebook(){var n=window.location.href;return FB.ui({method:"stream.share",u:n},function(n){if(n&&n.object_id){var t=JSON.parse($("input#articleSocial").val());$.ajax({url:t.service,data:{pageLink:t.pageRef,provider:"facebook"}})}}),!1}function ShareToDelicious(){return window.open("http://delicious.com/save?v5&noui&jump=close&url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"delicious","toolbar=no"),!1}function ShareToPusha(){return window.open("http://www.pusha.se/posta?url="+encodeURIComponent(location.href)+"&title="+encodeURIComponent(document.title),"pusha","toolbar=no"),!1}function ApplyRotatingView(n,t,i){var r=function(){var r=$("#rotationSlideshow > div"),u=$("#rotationSlideshow");r.each(function(){var n=$(this);u.height()1&&$("#rotationTeaserContainer>.teaser-container-inner").append('